package com.xoms.pad.aspect.datasource;

import java.sql.SQLException;
import java.util.Map;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

public class ChooseDataSource extends AbstractRoutingDataSource {

	@Override
	protected Object determineCurrentLookupKey() {
		return DataSourceSwitcher.getDataSourceType();
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	@Override
	public void setTargetDataSources(Map targetDataSources) {
		super.setTargetDataSources(targetDataSources);
	}

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@Override
	public Object unwrap(Class iface) throws SQLException {
		return null;
	}

	@SuppressWarnings("rawtypes")
	@Override
	public boolean isWrapperFor(Class iface) throws SQLException {
		return false;
	}

}
